package com.handong.handserialprogram.model.bean;

/**
 * 脚环实体
 * Created by Administrator on 2016/12/7.
 */
public class ChildTagGroupModel {
    /*
    n = TagId , s = SetDistance, d = Distance, l = lockType, l = electricityType, c = Control, b = broken
     */
    private String n = "";//脚环ID
    private int s = 0;//设置距离
    private float d = 0f;//实测距离
    /**
     * 锁扣状态：0=>关闭、1=>打开。
     */
    private int l = -1;
    /**
     * 电量：55 - 105。
     */
    private int e = -1;
    /**
     * 防剪：0=>正常 ，1 => 被损坏。
     */
    private int b = -1;
    /**
     * 监控状态：1：监控下  0：脱离监控  -1：已逃脱（超过n次没消息）
     */
    private int c = -1;

    public String getTagId() {
        return n;
    }

    public void setTagId(String tagId) {
        this.n = tagId;
    }

    public int getControl() {
        return c;
    }

    public void setControl(int control) {
        this.c = control;
    }

    public int getSetDistance() {
        return s;
    }

    public void setSetDistance(int setDistance) {
        s = setDistance;
    }

    public float getDistance() {
        return d;
    }

    public void setDistance(float distance) {
        d = distance;
    }

    public int getLockType() {
        return l;
    }

    public void setLockType(int lockType) {
        this.l = lockType;
    }

    public void setBroken(int broken) {
        this.b = broken;
    }

    public int getBroken() {
        return b;
    }

    public int getElectricityType() {
        return e;
    }

    public void setElectricityType(int electricityType) {
        this.e = electricityType;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof ChildTagGroupModel) {
            ChildTagGroupModel model = (ChildTagGroupModel) obj;
            return n.equals(model.getTagId());
        } else {
            return false;
        }
    }

    @Override
    public String toString() {
        return "Child:" + n;
    }
}
